import request from '@/utils/request';
import Qs from 'qs';
/**
 * 跳过邮寄状态
 * @param data
 */
export const skipProduct = (data: any) => {
    return request({
        url: `/basic/hmProducts/skipProduct`,
        method: 'post',
        data: data
    });
};
/**
 * 修改商品为已邮寄中状态
 * @param data
 */
export const editOne = (data: any) => {
    return request({
        url: "/basic/hmProducts/editOne",
        method: "post",
        data: data,
    });
};
/**
 * 补样邀约-确认邀约
 * @param data
 */
export const addExpress = (data: any) => {
    return request({
        url: "/basic/sampleInvitation/addExpress",
        method: "post",
        data: data,
    });
};
/**
 * 补样邀约-跳过
 * @param data
 */
export const skipExpress = (data: any) => {
    return request({
        url: "/basic/sampleInvitation/skipExpress",
        method: "post",
        data: data,
    });
};
/**
 * 修改商品状态为已到样
 * @param data
 */
export const editTwo = (data: any) => {
    return request({
        url: "/basic/hmProducts/editTwo",
        method: "get",
        params: data,
    });
};
/**
 * 修改商品为待上架
 * @param data
 */
export const editFour = (data: any) => {
    return request({
        url: "/basic/hmProducts/editFour?" + data,
        method: "get"
    });
};
/**
 * 修改商品为已上架
 * @param data
 * */
export const editFive = (data: any) => {
    return request({
        url: "/basic/hmProducts/editFive?" + data,
        method: "get"
    });
};
/**
 * 修改商品为下架
 * @param data
 */
export const editOff = (data: any) => {
    return request({
        url: "/basic/hmProducts/editOff?" + data,
        method: "get",
    });
};
/**
 * 修改商品为已退还
 * @param data
 * */
export const outSupplier = (data: any) => {
    return request({
        url: "/basic/hmProducts/outSupplier",
        method: "post",
        data
    });
};
/**
 * 获取所有主播
 * @param data
 */
export const deptTree = (query: any) => {
    return request({
        url: "/system/dept/deptTree",
        method: "get",
        params: query,
    });
};
/**
 * 修改商品为待送审
 * @param data
 */
export const editCore = (data: any) => {
    return request({
        url: "/basic/hmProducts/core",
        method: "post",
        data: data,
    });
};


/**
 * 快递信息识别
 * @param data
 */
export const getDeliveryInfo = (data: any) => {
    return request({
        url: '/basic/delivery/getDeliveryInfo',
        method: 'post',
        data: data,
    });
};
/**
 * 根据主播用户id查询部门
 * @param data
 */
export const queryUserIdByDeptId = (query: any) => {
    return request({
        url: "/basic/hmProducts/queryUserIdByDeptId",
        method: "get",
        params: query,
    });
};
/**
 * 修改主播是否重新送审
 * @param data
 */
export const changeCoreIsAudit = (data: any) => {
    return request({
        url: "/basic/hmProducts/changeCoreIsAudit",
        method: "post",
        data: data,
    });
};
/**
 * 修改主播接口
 * @param data
 */
export const changeCore = (data: any) => {
    return request({
        url: "/basic/hmProducts/changeCore",
        method: "post",
        data: data,
    });
};
/**
 * 获取部门列表
 */
export const getSystemList = (query: any) => {
    return request({
        url: "/system/dept/queryList",
        method: "get",
        params: query,
    });
}
/**
 * 核价初审
 */
export const editSevens = (data: any) => {
    return request({
        url: "/basic/hmProducts/editSeven",
        method: "post",
        data
    });
};
/**
 * 复审重新送审
 * @param data
 * */
export const reAuditSecond = (data: any) => {
    return request({
        url: "/basic/hmProducts/reAuditSecond",
        method: "post",
        data
    });
};
/**
 * 无合同审批入库
 * @param data
 */
export const noContractAdd = (data: any) => {
    return request({
        url: "/basic/contractAudit/noContractAdd",
        method: "post",
        data: data,
    });
};
/**
 * 入库无合同驳回情况下
 * @param data
 * */
export const submitAudit = (data: any) => {
    return request({
        url: "/basic/hmProducts/submitAudit",
        method: "post",
        data
    });
};
/**
 * 修改商品为已入库
 * @param data
 */
export const editTen = (data: any) => {
    return request({
        url: "/basic/hmProducts/editTen?" + data,
        method: "get",
    });
};
/**
 * 重新入库审批
 * @param data
 */
export const againStock = (data: any) => {
    return request({
        url: "/basic/stock/againStock",
        method: "post",
        headers: { "Content-Type": "application/x-www-form-urlencoded" },
        data: Qs.stringify(data),
    });
};

// 发起变价
export const changeAudit = (data: any) => {
    return request({
        url: "/basic/changeAudit/add",
        method: "post",
        data
    });
};

/**
 * 通过快递单号和代号查询物流轨迹
 * */
export const getLogisticsTraceDetailList = (params: any) => {
    return request({
        url: '/basic/hmProducts/getLogisticsTraceDetailList',
        method: 'get',
        params: params
    });
}
